Set CFLAGS, CPPFLAGS, and LDFLAGS solely via configure in debian/rules.
authorRob Browning <rlb@defaultvalue.org>
Fri, 20 Sep 2013 21:32:03 +0000 (16:32 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 20 Sep 2013 21:32:06 +0000 (16:32 -0500)
Don't override the CFLAGS, CPPFLAGS, and LDFLAGS values chosen by the
upstream configure script; instead, make any adjustments at configure
time.  Our quashing of "-Wl,-znocombreloc" during the make invocation
was causing i386 builds of emacs24-lucid to fail under X.

Thanks to Ćukasz Pankowski <lukpank@o2.pl> for the report, and Samuel
Bronson <naesten@gmail.com> for the patch.

Closes: 684788
debian/rules

index fdd71fd174b74b939112c53e645fb0083e5859fc..c8e88e9dca533d90227739682ccb8ebfbc9506fa 100755 (executable)
@@ -342,13 +342,13 @@ define cfg_tree
   rm -rf $(1)
   mkdir $(1)
   cp -a $$(ls -A | egrep -v '^(\.git|\.pc|debian)$$') "$(1)"
-  cd $(1) && CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" ./configure $(confflags) $(2)
+  cd $(1) && CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure $(confflags) $(2)
 endef
 
 define build_cmd
-  $(MAKE) -C $(1) -j $(joblimit) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
+  $(MAKE) -C $(1) -j $(joblimit)
   # If we don't use bootstrap, we need to explicitly build info.
-  $(MAKE) -C $(1) -j $(joblimit) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" info
+  $(MAKE) -C $(1) -j $(joblimit) info
   # Make sure we chose liblockfile.
   ldd $(1)/lib-src/movemail | grep liblockfile
 endef